import scala.beans.BeanProperty
// These are meant to be typed into the REPL. You can also run
// scala -Xnojline < repl-session.scala to run them all at once.
/**
 * Person将会生成四个方法
 * 1、name:String
 * 2、name_=(newValue: String): Unit
 * 3、getName(): String
 * 4、setName(newValue: String): Unit
 * 其中1、2是自动生成的，3、4是@BeanProperty生成的
 */

class Person {
  @BeanProperty var name : String = _
}

val fred = new Person
fred.setName("Fred")
fred.getName
fred.getName()
